<template>
  <div class="container">
    <!--head区域-->
    <mt-header style="z-index: 99" fixed title="明玉-vue"></mt-header>

    <!--router-view-->
    <!--加动画-->
    <transition>
      <router-view></router-view>
    </transition>

    <!--底部toolbar区域-->
    <nav class="mui-bar mui-bar-tab">
      <router-link class="mui-tab-ll" to="/home">
        <span class="mui-icon mui-icon-home"></span>
        <span class="mui-tab-label">首页</span>
      </router-link>
      <router-link class="mui-tab-ll" to="/member">
        <span class="mui-icon mui-icon-contact"></span>
        <span class="mui-tab-label">会员</span>
      </router-link>
      <router-link class="mui-tab-ll" to="/shopcar">
        <span class="mui-icon mui-icon-extra mui-icon-extra-cart"><span class="mui-badge">0</span></span>
        <span class="mui-tab-label">购物车</span>
      </router-link>
      <router-link class="mui-tab-ll" to="search">
        <span class="mui-icon mui-icon-search"></span>
        <span class="mui-tab-label">搜索</span>
      </router-link>
    </nav>
  </div>
</template>

<style>
.container{
  padding-top: 40px;
  /*解决动画问题，隐藏超过页面的部分，当动画开始时隐藏，解决出现滚动条问题，隐藏横向*/
  overflow-x: hidden;
}

.v-enter{
  opacity: 0;
  transform: translateX(100%);
}
.v-leave-to{
  /*解决动画问题，内容向上飘后在向右小数，enter和leave分开解决从右面消失问题，position解决内容向下问题*/
  transform: translateX(-100%);
  opacity: 0;
  position: absolute;
}

.v-enter-active,
.v-leave-active{
  transition: all 0.5s ease;
}

/*解决加入图片滚动条后，toolbar用不了的问题*/
.mui-bar-tab .mui-tab-ll {
  display: table-cell;
  overflow: hidden;
  width: 1%;
  height: 50px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #929292;
}
.mui-bar-tab .mui-tab-ll.mui-active {
  color: #007aff;
}
.mui-bar-tab .mui-tab-ll .mui-icon {
  top: 3px;
  width: 24px;
  height: 24px;
  padding-top: 0;
  padding-bottom: 0;
}
.mui-bar-tab .mui-tab-ll {
  display: table-cell;
  overflow: hidden;
  width: 1%;
  height: 50px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #929292;
}
.mui-bar-tab .mui-tab-ll .mui-icon~.mui-tab-label {
  font-size: 11px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mui-bar-tab .mui-tab-ll {
  display: table-cell;
  overflow: hidden;
  width: 1%;
  height: 50px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #929292;
}

</style>
